package com.example.system.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("sys_item")
@Api(value = "项目日志表实体", tags = {"项目日志表实体"})
public class Item {
    @TableId
    @ApiModelProperty("主键")
    private Integer id;

    @ApiModelProperty("项目创建者id")
    private Integer createBy;

    @ApiModelProperty("项目创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty("项目最近修改的时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime updateTime;

    @ApiModelProperty("项目的内容，对应sys_project的id")
    private Integer projectId;

    @TableField(exist = false)
    @ApiModelProperty("项目的状态")
    private String status;

    @TableField(exist = false)
    @ApiModelProperty("项目内容实体")
    private Project project;

    @TableField(exist = false)
    @ApiModelProperty("用户/创建人实体")
    private User user;

    @TableField(exist = false)
    @ApiModelProperty("项目评分")
    private Double score;

    @TableField(exist = false)
    @ApiModelProperty("项目审核")
    private Process process;

}

